package com.gongren.open.rabbitmq.receiver;

//import com.alibaba.dubbo.config.annotation.Reference;
//import com.gongren.open.rpc.service.dao.mappers.ActivitySignUpMapper;
////import com.gongren.open.rpc.service.domain.ActivitySignUp;
//import com.gongren.project.open.rpc.api.IActivityRpcService;
//import org.apache.log4j.Logger;
//import org.springframework.amqp.rabbit.annotation.RabbitListener;
//import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * Created by zhangjinxia on 2017/8/10.
 */
@Component
public class MqReceiver {

//    private static Logger logger = Logger.getLogger(MqReceiver.class);
//
//    @Autowired
//    ActivitySignUpMapper activitySignUpMapper;
//
//    @Reference
//    private IActivityRpcService activityRpcService;
//
////    @RabbitListener(queues = MqKeyConstants.activityRegister)
////    public void register(String json) {
////        logger.info(String.format("receive mq activity register vo: %s", json));
////        try {
////            ActivitySignUpRpcVo activitySignUpRpcVo = JSONObject.parseObject(json, ActivitySignUpRpcVo.class);
////            activitySignUpRpcService.saveActivitySignUp(activitySignUpRpcVo);
////        }catch (Exception e){
////            logger.error("receive mq activity register error",e);
////        }
////    }
//
////    @RabbitListener(queues = "insertActivitySignUp")
////    public void register(ActivitySignUp activitySignUp) {
//////        logger.info(String.format("receive mq activity register vo: %s", json));
////        try {
//////            ActivitySignUpRpcVo activitySignUpRpcVo = JSONObject.parseObject(json, ActivitySignUpRpcVo.class);
//////            activitySignUpRpcService.saveActivitySignUp(activitySignUpRpcVo);
////            activitySignUpMapper.save(activitySignUp);
////        }catch (Exception e){
////            logger.error("receive mq activity register error",e);
////        }
////    }


}
